package cn.dapeng.lambda;

import java.util.Arrays;
import java.util.List;

public class LambdaT02 {

    public static void main(String[] args) {
        List<String> l1 = Arrays.asList("hello", "hi", "china");

        List<String> l2 = List.copyOf(l1);

        l2.add("a");

        System.out.println(l1 == l2);

        List<String> l3 = List.of("hello", "hi", "china");

        String a = "A", b;

        switch (a) {
            case "a", "b" -> b = "a";
            case "c", "d" -> b = "d";
            default -> b = "c";
        }

        b = switch (a) {
            case "a", "b" -> "a";
            case "c", "d" ->"d";
            default -> "c";
        };
    }




}
